The number of pixels on modern digital cameras has rapidly grown in the past few years. Cameras today typically have such high megapixel counts that they far exceed the resolution of existing displays. For example, more than 10 high-definition 720p displays are required in order to view an image from a 10 megapixel camera without downsampling. Diffraction and aberrations from the camera's optics blur the image at the sensor, which limits the effectiveness of high spatial sampling. Instead of simply increasing spatial resolution, the large number of pixels offer a possibility to improve other aspects of photographs. Possible advances include increased sensitivity for low light photography, dynamic range expansion for scenes with bright and dark regions, and improved color accuracy. The present invention addresses at least such some of these advances.